<template>
    <div class="top-button">
        <div class="tags-breadcrumb">
            <i class="el-icon-ijax-menu breadcrumb_collapse"
            :class="[{ 'breadcrumb_collapse--right': isCollapse }]"
            @click="showCollapse"></i>
        </div>
    </div>
</template>

<script>
import { mapGetters } from "vuex";
export default {
  name: "index",
  methods: {
    showCollapse() {
      this.$store.dispatch("ToggleSideBar");
    }
  },
  computed: {
    ...mapGetters(["sidebar"]),
    isCollapse() {
      return this.sidebar.opened;
    }
  }
};
</script>

<style lang="scss" scoped>
.top-button {
  display: flex;
  align-items: center;
}
.breadcrumb {
  &_collapse {
    &--right {
      transform: rotate(90deg);
    }
    line-height: 55px;
    font-size: 30px;
    transition: 0.3s;
    cursor: pointer;
    padding-left: 15px;
    padding-top: 7px;
  }
}
</style>
